<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        li {
            border: solid 2px #ddd;
            margin-bottom: 20px;
        }
        /* 将空的元素隐藏起来 */
        li:empty {
            display: none;
        }
        /* 锚点跳转效果 */
        div:target {
            color: aquamarine;
        }
        div{
            border: solid 2px #ddd;
            height: 900px;
        }
    </style>
</head>
<body>
    <a href="#target">点击跳转</a>
    <div></div>
    <div id="target">
        目标锚点
    </div>
    <ul>
        <li>杨胖胖</li>
        <li></li>
    </ul>
</body>
</html>